package com.qiku.feign;


import com.qiku.entity.Store;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("qiku-service-store")
public interface StoreFeign {

    @GetMapping("/store/query")
    public List<Store> query();

    @GetMapping("/store/query/{id}")
    public Store queryById(@PathVariable Integer id);

    /**
     * 根据id删除
     * @param id
     */
    @GetMapping("/store/removeById")
    public void removeById(@PathVariable Integer id);

    /**
     * 保存或者修改
     * @param store
     */
    @PostMapping("/store/saveOrUpdate")
    public void saveOrUpdate(@RequestBody Store store);

}
